package web.fabrimind.pm.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import web.fabrimind.common.annotation.Excel;
import web.fabrimind.common.core.domain.BaseEntity;

/**
 * 生产计划对象 production_plan
 *
 * @author zhihui
 * @date 2025-03-25
 */
public class ProductionPlan extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 计划ID
     */
    private Long planId;

    /**
     * 计划编号
     */
    @Excel(name = "计划编号")
    private String planCode;

    /**
     * 计划名称
     */
    @Excel(name = "计划名称")
    private String planName;

    /**
     * 产品ID
     */
    @Excel(name = "产品ID")
    private Long productId;

    /**
     * 计划生产数量
     */
    @Excel(name = "计划生产数量")
    private Long planQuantity;

    /**
     * 实际生产数量
     */
    @Excel(name = "实际生产数量")
    private Long actualQuantity;

    /**
     * 生产线ID
     */
    @Excel(name = "生产线ID")
    private Long lineId;

    /**
     * 计划开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 计划结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 计划状态（0:未开始 1:进行中 2:已完成 3:已取消）
     */
    @Excel(name = "计划状态", readConverterExp = "0=:未开始,1=:进行中,2=:已完成,3=:已取消")
    private String status;

    /**
     * 优先级
     */
    @Excel(name = "优先级")
    private Long priority;

    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String productName;

    /**
     * 生产线名称
     */
    @Excel(name = "生产线名称")
    private String lineName;

    /**
     * BOMID
     */
    @Excel(name = "BOMID")
    private Long bomId;

    /**
     * BOM名称
     */
    @Excel(name = "BOM名称")
    private String bomName;

    public Long getBomId() {
        return bomId;
    }

    public void setBomId(Long bomId) {
        this.bomId = bomId;
    }

    public String getBomName() {
        return bomName;
    }

    public void setBomName(String bomName) {
        this.bomName = bomName;
    }

    public String getLineName() {
        return lineName;
    }

    public void setLineName(String lineName) {
        this.lineName = lineName;
    }


    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }


    public void setPlanId(Long planId) {
        this.planId = planId;
    }

    public Long getPlanId() {
        return planId;
    }

    public void setPlanCode(String planCode) {
        this.planCode = planCode;
    }

    public String getPlanCode() {
        return planCode;
    }

    public void setPlanName(String planName) {
        this.planName = planName;
    }

    public String getPlanName() {
        return planName;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setPlanQuantity(Long planQuantity) {
        this.planQuantity = planQuantity;
    }

    public Long getPlanQuantity() {
        return planQuantity;
    }

    public void setActualQuantity(Long actualQuantity) {
        this.actualQuantity = actualQuantity;
    }

    public Long getActualQuantity() {
        return actualQuantity;
    }

    public void setLineId(Long lineId) {
        this.lineId = lineId;
    }

    public Long getLineId() {
        return lineId;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setPriority(Long priority) {
        this.priority = priority;
    }

    public Long getPriority() {
        return priority;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("planId", getPlanId())
                .append("planCode", getPlanCode())
                .append("planName", getPlanName())
                .append("productId", getProductId())
                .append("planQuantity", getPlanQuantity())
                .append("actualQuantity", getActualQuantity())
                .append("lineId", getLineId())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("status", getStatus())
                .append("priority", getPriority())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("productName", getProductName())
                .append("lineName", getLineName())
                .append("bomId", getBomId())
                .append("bomName", getBomName())
                .toString();
    }
}
